package cn.wolfcode.trip.base.service.impl;

import cn.wolfcode.trip.base.domain.Aite;
import cn.wolfcode.trip.base.domain.Daily;
import cn.wolfcode.trip.base.domain.DailyContent;
import cn.wolfcode.trip.base.mapper.AiteMapper;
import cn.wolfcode.trip.base.mapper.DailyContentMapper;
import cn.wolfcode.trip.base.mapper.DailyMapper;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.service.IAiteService;
import cn.wolfcode.trip.base.service.IDailyService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class AiteServiceImpl implements IAiteService {
    @Autowired
    private AiteMapper aiteMapper;

    @Override
    public void insertRecord(Aite aite) {
        aite.setCreatetime(new Date());
        aiteMapper.insert(aite);
    }

    @Override
    public int getaiteNum(Long authorId, int read) {
        return aiteMapper.getAiteNum(authorId,read);
    }

    @Override
    public void updateAiteState(Long authorId, int read) {
        aiteMapper.updateAiteState(authorId,read);
    }
}
